﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model;
using DAL;
using System.Data.SqlClient;

namespace BLL
{
    public  class PhotoBLL
    {
        public List<Photo> GetPhoto(params SqlParameter[] param)
        {
            return new PhotoDAL().GetList<Photo>(param);
        }
        public bool AddPhoto(params SqlParameter[] param) 
        {
            Photo photo = new Photo();
            return new PhotoDAL().Add(photo,param);
        }
        public Photo GetPhotoById(SqlParameter[] param)
        {
            return new PhotoDAL().GetList<Photo>(param).FirstOrDefault();
        }
    }
}
